﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace park.Equipment
{
    public partial class RepeatersAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            string no = this.txtNo.Text;
            string code = this.txtCode.Text;
            string longitude=this.txtLongitude.Text;
            string latitude=this.txtLatitude.Text;
            string collectorNo=this.txtCollectorNo.Text;

            cn.linkit.epark.ServiceList sl = new cn.linkit.epark.ServiceList();

            bool flag = sl.AddRepeaters(no, code, longitude, latitude, collectorNo);

            if (flag)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "<script>alert(\"数据保存功能！\")</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "<script>alert(\"数据保存失败，请重试 ...\")</script>");
            }
        }
    }
}